import java.util.ArrayList;
import java.util.List;

/**
 * Created by abely on 16-2-18.
 */
public class StringUtil {


    public static String getSuffix(String s){
        List<String> suffixs = new ArrayList<String>(){{add("jpg"); add("png");add("gif");}};
        for(String suffix : suffixs){
            if(s.matches(".*\\.(?i)"+suffix)){
                return suffix;
            }
        }
        return "未定义类型";
    }
}
